include $(TOPDIR)/rules.mk
PKG_NAME:=rtty
-PKG_VERSION:=8.1.5
+PKG_VERSION:=9.0.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL=https://github.com/zhaojh329/rtty/releases/download/v$(PKG_VERSION)
-PKG_HASH:=b10555e441741dad4baaa7366dfaeef81ea73dfd89fd7c478ecae1ceab74b56a
+PKG_HASH:=5137cbe2f58588851376f2e74ded7f570320bd7cfc437d47d2485fb4be5042a1
PKG_LICENSE:=MIT
#config rtty
# option interface 'lan'
# option id 'My-Device'
+# option group 'My-Group'
# option description 'Description of my device'
# option host 'your-server-host' # Server host
# option port '5912' # Server Port
# option insecure '1' # Allow insecure server connections when using SSL
# option token 'your-token' # generated by rttys
# option username 'root' # Skip a second login authentication. See man login(1) about the details
+# option heartbeat '30' # Heartbeat interval in seconds(Default is 30s)
# option verbose '1' # verbose log
validate_rtty_section() {
uci_load_validate rtty rtty "$1" "$2" \
'interface:uci("network", "@interface"):lan' \
- 'id:maxlength(63)' \
+ 'id:maxlength(32)' \
+ 'group:maxlength(16)' \
'description:maxlength(126)' \
'host:host' \
'port:port' \
'insecure:bool:0' \
'token:maxlength(32)' \
'username:string' \
+ 'heartbeat:uinteger' \
'verbose:bool:0'
}
procd_open_instance
procd_set_param command $BIN -h $host -I "$id" -a
+ [ -n "$group" ] && procd_append_param command -g "$group"
[ -n "$port" ] && procd_append_param command -p "$port"
[ -n "$description" ] && procd_append_param command -d "$description"
[ "$ssl" = "1" ] && procd_append_param command -s
[ "$insecure" = "1" ] && procd_append_param command -x
[ -n "$token" ] && procd_append_param command -t "$token"
[ -n "$username" ] && procd_append_param command -f "$username"
+ [ -n "$heartbeat" ] && procd_append_param command -i "$heartbeat"
[ "$verbose" = "1" ] && procd_append_param command -v
procd_set_param respawn
procd_close_instance